clc
clear all

addpath 'D:\matlab2022\bin\SHGpty'

phlgp=rand(256,256);
phlgp=phlgp/max(max(phlgp));
s=exp(i*pi/20.*phlgp);
lamda=515;
XX=s(:,1);
YY=s(2,:);
x=1:256;
y=1:256;
[xx,yy]=meshgrid(x,y);
ZZ=angle(s)/2/pi*lamda;
surf(xx,yy,ZZ);